package com.liao.seckill.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.io.Serializable;

/**
 * (OrderInf)实体类
 *
 * @author long
 * @since 2022-05-06 15:34:47
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "order_inf")
public class TbOrderInf implements Serializable {
    private static final long serialVersionUID = -40229277343193613L;

    @Id
    private String id;
    @Column(name = "user_id")
    private Integer userId;
    @Column(name = "goods_id")
    private Integer goodsId;
    /**
    * 购买的商品数量
    */
    @Column(name = "order_num")
    private Integer orderNum;
    /**
    * 冗余的商品名称，用于避免多表连接
    */
    @Column(name = "goods_name")
    private String goodsName;

    @Column(name = "order_price")
    private Double orderPrice;
    /**
    * 订单的渠道：1、PC2、2、安卓3、ios
    */
    @Column(name = "order_channel")
    private Integer orderChannel;
    /**
    * 订单状态：0新建未支付, 1已支付,2已发货, 3已收货, 4已退款,5已完成
    */
    @Column(name = "order_status")
    private Integer orderStatus;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "pay_time")
    private Date payTime;


}
